/*
 * @Description: 
 * @Author: Aroma
 * @Date: 2024-09-03 09:33:38
 * @LastEditors: Aroma
 * @LastEditTime: 2024-09-03 10:08:44
 * @别瞎看: 你个无脑牛马
 */

public class Test_SaveMoney{
    public static void main(String[] args) {
        double dayMoney=2.5;//每天存2.5
        // Scanner scanner=new Scanner(System.in);
        // Scanner scanner;
        int day=1;//天数
        // int dayCost=6;//封5花6元
        double sumMoney=0;//
        int result=100;//存100
        // for(money=0;money<=100;money+=2.5){
        //     money=day*dayMoney;
        //     while(day%5==0){
        //         money=(day*a)-6;
        //     }
        //     if(money==100){
        //         // System.out.println("终于在"+day+"存够了");
        //     }
        //     break;
        //     System.out.println("终于在"+day+"存够了");
        // }
    
        while (true){
            //每天存2.5元
            sumMoney+=dayMoney;
            System.out.println("第"+day+"天,存了"+sumMoney+"元。");
            if(day%5==0){
               sumMoney-=6; 
            System.out.println("第"+day+"天,花了6元");

            }
            if(sumMoney>=result){
                break;
            }
            day++;
       }
       System.out.println("一共经过"+day+"天，小芳能存到"+sumMoney+"元");
    }
}